import request from '@/utils/request'


export function selectList() {
  return request({
    url: '/system/email/selectList',
    method: 'get',
  })
}

export function addIssueEmail(issueEmail) {
  return request({
    url: '/system/email/addIssueEmail',
    method: 'post',
    data: issueEmail
  })
}


export function updateIssueEmail(issueEmail) {
  return request({
    url: '/system/email/updateIssueEmail',
    method: 'post',
    data: updateIssueEmail
  })
}

export function deleteIssueEmail(id) {
  return request({
    url: '/system/email/deleteIssueEmail/' + id,
    method: 'delete'
  })
}

export function selectById(id) {
  return request({
    url: '/system/email/selectById/' + id,
    method: 'get'
  })
}

export function selectTemplateById(id,offerId) {
  return request({
    url: '/system/email/selectTemplateById/' + id+'/'+offerId,
    method: 'get'
  })
}

export function selectTemplateList() {
  return request({
    url: '/system/email/selectTemplateList',
    method: 'get'
  })
}

export function addTemplate(itoTemplate) {
  return request({
    url: '/system/email/addTemplate',
    method: 'post',
    data: itoTemplate
  })
}


export function updateTemplateById(itoTemplate) {
  return request({
    url: '/system/email/updateTemplateById',
    method: 'put',
    data: itoTemplate
  })
}


export function deleteOfferTemplate(id) {
  return request({
    url: '/system/email/deleteOfferTemplate/'+id,
    method: 'delete'
  })
}


